﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using pipeCore.Pipes.Ports;
using pipeCore.Pipes.Units.NamedPortUnits.Units;
namespace VirtualPowerPointServes
{
    public partial class Service1 : ServiceBase
    {
        WifiChannel.WifiChannel wifi = new WifiChannel.WifiChannel();
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            wifi.Initalise();
            wifi.OpenChannel();
            wifi.OnMessgaRecived += new EventHandler<vppServer.MessageRecivedEventArgs>(wifi_OnMessgaRecived);
            wifi.StartListning();
        }

        void wifi_OnMessgaRecived(object sender, vppServer.MessageRecivedEventArgs e)
        {
            throw new NotImplementedException();
        }

        protected override void OnStop()
        {
            wifi.CloseChannel();
            wifi.Deinitalise();
        }
    }
}
